package user_assets_pix

import (
	"context"

	"gitee.com/liuxuezhan/ar-platform/admin-api/internal/svc"
	"gitee.com/liuxuezhan/ar-platform/admin-api/internal/types"
	"gitee.com/liuxuezhan/ar-platform/admin-api/pkg/emun"

	"github.com/zeromicro/go-zero/core/logx"
)

type UserPixWalletTypeLogic struct {
	logx.Logger
	ctx    context.Context
	svcCtx *svc.ServiceContext
}

// pix钱包类型
func NewUserPixWalletTypeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserPixWalletTypeLogic {
	return &UserPixWalletTypeLogic{
		Logger: logx.WithContext(ctx),
		ctx:    ctx,
		svcCtx: svcCtx,
	}
}

func (l *UserPixWalletTypeLogic) UserPixWalletType() (resp *types.UserPixEwalletTypeResponse, err error) {
	var enumData []types.Emun
	for key, value := range emun.UserPixWalletTypeMap {
		enumData = append(enumData, types.Emun{
			Key:   int32(key),
			Value: value,
		})
	}

	return &types.UserPixEwalletTypeResponse{
		EmunData: enumData,
	}, nil
}
